package com.xuankejun;

import cn.bmob.v3.Bmob;

import com.xuankejun.view.Discipline;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener{

	private Button topTopic;
	private Button recommendation;
	private Button classification;
	private Button discipline;
	private Button program;
	private Button myProgram;
	
	private Intent intent;
	
	public static final int REQUEST = 1;
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        Bmob.initialize(this, "98b79f4d62fdaccf89f843a75cf7ad50");
        
        intent = new Intent();
        
        topTopic = (Button)findViewById(R.id.topTopic);
        recommendation = (Button)findViewById(R.id.recommendation);
        classification = (Button)findViewById(R.id.classification);
        discipline = (Button)findViewById(R.id.discipline);
        program = (Button)findViewById(R.id.program);
        myProgram = (Button)findViewById(R.id.myProgram);
        
        topTopic.setOnClickListener(this);
        recommendation.setOnClickListener(this);
        classification.setOnClickListener(this);
        discipline.setOnClickListener(this);
        program.setOnClickListener(this);
        myProgram.setOnClickListener(this);
        
    }

	@Override
	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		switch(arg0.getId()){
		case R.id.topTopic:
			break;
		case R.id.recommendation:
			break;
		case R.id.classification:
			break;
		case R.id.discipline:
			intent.setClass(MainActivity.this, Discipline.class);
			startActivityForResult(intent, REQUEST);
			break;
		case R.id.program:
			break;
		case R.id.myProgram:
			break;
		default:
			break;
		}
	}
}
